﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BL
{
    public class NguoiDungBL
    {
        NguoiDungQuery nguoiDung = new NguoiDungQuery();

        public NguoiDung_DAL LayNguoiDungTheoTaiKhoan(string taikhoan)
        {
            return nguoiDung.LayNguoiDungTheoTaiKhoan(taikhoan);
        }

        public bool KTDangNhap(string taikhoan, string matkhau)
        {
            return nguoiDung.KTDangNhap(taikhoan, matkhau);
        }

        public string LayMaQuyenTheoTaiKhoan(string taikhoan)
        {
            return nguoiDung.LayMaQuyenTheoTaiKhoan(taikhoan);
        }

        public string LayMatKhauTheoTaiKhoan(string taikhoan)
        {
            return nguoiDung.LayMatKhauTheoTaiKhoan(taikhoan);
        }

        public bool ThemNguoiDung(NguoiDung_DAL nd)
        {
            return nguoiDung.ThemNguoiDung(nd);
        }

        public List<NguoiDung_DAL> LayDanhSachNguoiDungTheoMaQuyen(string maquyen)
        {
            return nguoiDung.LayDanhSachNguoiDungTheoMaQuyen(maquyen);
        }

        public bool XoaNguoiDungTheoTaiKhoan(string taikhoan)
        {
            return nguoiDung.XoaNguoiDungTheoTaiKhoan(taikhoan);
        }

        public bool SuaNguoiDungTheoTaiKhoan(string matkhau, string maquyen, string hoten, string diachi, string email, string sodienthoai, string ghichu, string taikhoan)
        {
            return nguoiDung.SuaNguoiDungTheoTaiKhoan (matkhau, maquyen, hoten, diachi, email, sodienthoai, ghichu,taikhoan);
        }
    }
}
